package com.atguigu.guli.service.base.exception;

import com.atguigu.guli.service.base.result.ResultCodeEnum;
import lombok.Data;

@Data
public class GuliException extends RuntimeException {
//    状态码
    private Integer code;

//    接收枚举类型


    public GuliException(ResultCodeEnum codeEnum) {
        this(codeEnum.getMessage());
        this.code = codeEnum.getCode();
    }

    public GuliException(String message) {
        super(message);
    }
}
